package com.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.entity.MenuItem;
import com.mapper.MenuItemMapper;
import com.service.MenuItemService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MenuItemServiceImpl extends ServiceImpl<MenuItemMapper, MenuItem> implements MenuItemService {
    
    @Resource
    private MenuItemMapper mapper;
    
    @Override
    public List<MenuItem> selectFatherMenu(int userId) {
        return mapper.selectFatherMenu(userId);
    }

    @Override
    public List<MenuItem> selectChildMenu(int pid,int userId) {
        return mapper.selectChildMenu(pid,userId);
    }

    @Override
    public List<MenuItem> selectBtn(int pid, int userId) {
        return mapper.selectBtn(pid, userId);
    }

    @Override
    public List<MenuItem> selectFatherMenuByUser(int userId) {
        return mapper.selectFatherMenuByUser(userId);
    }

    @Override
    public List<MenuItem> selectChildMenuByUser(int pid, int userId) {
        return mapper.selectChildMenuByUser(pid, userId);
    }

    @Override
    public List<MenuItem> selectBtnByUser(int pid, int userId) {
        return mapper.selectBtnByUser(pid, userId);
    }
}
